package com.platform.apex.cma.db;

import org.skife.jdbi.v2.sqlobject.BindBean;
import org.skife.jdbi.v2.sqlobject.GetGeneratedKeys;
import org.skife.jdbi.v2.sqlobject.SqlUpdate;
import org.skife.jdbi.v2.sqlobject.customizers.Define;
import org.skife.jdbi.v2.sqlobject.customizers.RegisterMapper;
import org.skife.jdbi.v2.sqlobject.mixins.Transactional;

import com.platform.apex.util.BaseTableInfoMapper;


@RegisterMapper(BaseTableInfoMapper.class)
public interface Grib2DataInfoDao extends Transactional<Grib2DataInfoDao> {

	@SqlUpdate("INSERT INTO datavi_cma_wrf_fnl_data (id, filePath, dateDayStr, dateHourStr, dateDayLong, dateHourLong, createTime, updateTime) "
			+ " VALUES (:id, :filePath, :dateDayStr, :dateHourStr, :dateDayLong, :dateHourLong, :createTime, :updateTime)")
	@GetGeneratedKeys
	long insert(@BindBean Grib2DataInfo grib2DataInfo);

	@SqlUpdate("<sql>")
	long insertSql(@Define("sql") String sql);

}
